<?php
$this->headTitle('Installation Phase for ' . $this->projectName);
?>
<script type="text/javascript">
	dojo.require('dijit.form.Button');
	dojo.require('dijit.form.TextBox');
	loadSignatures();
	
	function addSignature() {
		dojo.xhrPost({
			url:		'<?php echo $this->baseUrl(); ?>/signatures/add/',
			handleAs:	'json',
			error: function(data, ioArgs) {
				alert('There was an error adding the signature');
			},
			load: function(data, ioArgs) {
				loadSignatures();
				dojo.byId('newSig').value = '';
			},
			content: {
				name: 	dojo.byId('newSig').value,
				type:	'installation'
			}
		});
	}
	
	function loadSignatures() {
		dojo.xhrGet({
			url:	'<?php echo $this->baseUrl(); ?>/signatures/generate/type/installation',
			load:	function(data, ioArgs) {
				dojo.byId('signatures').innerHTML = data;
			}
		});
		
	}
</script>
<h1>Installation Phase of '<?php echo $this->projectName; ?>'</h1>

<p>
At this time, this section just allows you to sign off that the Installation procedure has been finished. Eventually documents and installation reports will be able to be uploaded and reviewed from here.
</p>

<p>
For the time being, once all Debugging process has been finished offline, please sign off on this section to move on to Maintenance.
</p>

<h2>Signatures</h2>
<div id="signatures">
</div>

<div id="addSig">
<label for="newSig">Name:</label><input type="text" name="newSig" id="newSig" dojoType="dijit.form.TextBox">
<button dojoType="dijit.form.Button" onClick="addSignature();">Add Signature</button>
</div>

